import request from '@/utils/request'

// 获取客户列表
export function KundeList(params) {
  return request({
    url: '/clients',
    method: 'get',
    params
  })
}

// 获取客户数量
export function KundeCount(params) {
  return request({
    url: '/clients/count',
    method: 'get',
    params
  })
}

// 新建客户
export function addKundeFn(data) {
  return request({
    url: '/clients',
    method: 'post',
    data
  })
}

// 编辑客户
export function undateKundeFn(data) {
  return request({
    url: '/clients/' + data.id,
    method: 'put',
    data
  })
}
// 删除客户
export function delKundeFn(id) {
  return request({
    url: '/clients/' + id,
    method: 'delete'
  })
}

// 某一个客户
export function editsKundeFn(id) {
  return request({
    url: '/clients/' + id,
    method: 'get'
  })
}
